<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var a = "hello";
        var b = "world";

        // a = "world";
        // b = "hello";

        // a = b;  // a  = "world";
        // b = a;  // b = a(world)  --->b = world;
        // console.log(a,b);

        // 通过第三个变量 保存 a的值 
        var c = a;  // c = "hello";
        a = b; // a= "world";
        b = c;  // b = c = "hello";
        console.log(a,b);

    </script>
</body>
</html>